import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/HomeView.vue'
import MicirVueThree from '@/views/micro/MicroVueThree.vue'
import MicirVueTwo from '@/views/micro/MicroVueTwo.vue'
import MicroReact from '@/views/micro/MicroReact.vue'

import LayoutView from '../views/Layout/LayoutView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: LayoutView,
      redirect: '/home',
      children: [
        {
          path: '/home',
          name: 'home',
          component: HomeView
        },
        {
          path: '/react',
          name: 'react',
          component: MicroReact
        },
        {
          path: '/vue2',
          name: 'vue2',
          component: MicirVueTwo
        },
        {
          path: '/vue3/:page*',
          name: 'vue3',
          component: MicirVueThree
        },

      ]
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import('../views/Login/login.vue')
    }
  ]
})


export default router
